import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [{
            path: '/home',
            component: () =>
                import ('@/view/home'),
            meta: {
                title: 'PERGO'
            }
        },
        {
            name: 'index',
            path: '/index',
            component: () =>
                import ('@/view/components/index'),
            meta: {
                title: '首页'
            }
        },
        {
            name: 'about-introduce',
            path: '/about-introduce',
            component: () =>
                import ('@/view/components/about-introduce'),
            meta: {
                title: '关于我们-公司介绍'
            }
        },
        {
            name: 'about-course',
            path: '/about-course',
            component: () =>
                import ('@/view/components/about-course'),
            meta: {
                title: '关于我们-公司历程'
            }
        },
        {
            name: 'about-global',
            path: '/about-global',
            component: () =>
                import ('@/view/components/about-global'),
            meta: {
                title: '关于我们-全球分布'
            }
        },
        {
            name: 'about-store',
            path: '/about-store',
            component: () =>
                import ('@/view/components/about-store'),
            meta: {
                title: '关于我们-查找门店'
            }
        },
        {
            name: 'news',
            path: '/news',
            component: () =>
                import ('@/view/components/news'),
            meta: {
                title: '最新动态'
            }
        },
        {
            name: 'news-details',
            path: '/news-details',
            component: () =>
                import ('@/view/components/news-details'),
            meta: {
                title: '最新动态-动态详情'
            }
        },
        {
            name: 'product',
            path: '/product',
            component: () =>
                import ('@/view/components/product'),
            meta: {
                title: '产品中心'
            }
        },
        {
            name: 'parts',
            path: '/parts',
            component: () =>
                import ('@/view/components/parts'),
            meta: {
                title: '产品中心-配件'
            }
        },
        {
            name: 'product-details',
            path: '/product-details',
            component: () =>
                import ('@/view/components/product-details'),
            meta: {
                title: '产品中心'
            }
        },
        {
            name: 'case',
            path: '/case',
            component: () =>
                import ('@/view/components/case'),
            meta: {
                title: '案例灵感'
            }
        },
        {
            name: 'case-details',
            path: '/case-details',
            component: () =>
                import ('@/view/components/case-details'),
            meta: {
                title: '案例灵感-详情'
            }
        },
        {
            name: 'dealer',
            path: '/dealer',
            component: () =>
                import ('@/view/retail/dealer'),
            meta: {
                title: '经销商中心'
            }
        },
        {
            name: 'login-success',
            path: '/login-success',
            component: () =>
                import ('@/view/retail/login-success'),
            meta: {
                title: '经销商中心'
            }
        },
        {
            name: 'reserve',
            path: '/reserve',
            component: () =>
                import ('@/view/commercial/reserve'),
            meta: {
                title: '预定样品'
            }
        },
        {
            name: 'fill-info',
            path: '/fill-info',
            component: () =>
                import ('@/view/commercial/fill-info'),
            meta: {
                title: '预定样品'
            }
        },
        {
            name: 'Installation',
            path: '/Installation',
            component: () =>
                import ('@/view/More/Installation'),
            meta: {
                title: '更多-安装'
            }
        },
        {
            name: 'protection',
            path: '/protection',
            component: () =>
                import ('@/view/More/protection'),
            meta: {
                title: '更多-环保认证'
            }
        },
        {
            name: 'clearning',
            path: '/clearning',
            component: () =>
                import ('@/view/More/clearning'),
            meta: {
                title: '更多-清洁与养护证'
            }
        },
        {
            name: 'search',
            path: '/search',
            component: () =>
                import ('@/view/components/search'),
            meta: {
                title: '更多-清洁与养护证'
            }
        },
        {
            name: 'structureSize',
            path: '/structureSize',
            component: () =>
                import ('@/view/productCenter/structureSize'),
            meta: {
                title: '更多-实木复合地板-结构及尺寸总览'
            }
        },
        {
            name: 'surfaceWork',
            path: '/surfaceWork',
            component: () =>
                import ('@/view/productCenter/surfaceWork'),
            meta: {
                title: '更多-强化复合地板-表面工艺'
            }
        },
        {
            name: 'surfaceWork1',
            path: '/surfaceWork1',
            component: () =>
                import ('@/view/productCenter/surfaceWork1'),
            meta: {
                title: '更多-实木复合地板-表面工艺'
            }
        },
        {
            name: 'qualityGrade',
            path: '/qualityGrade',
            component: () =>
                import ('@/view/productCenter/qualityGrade'),
            meta: {
                title: '更多-强化复合地板-质量等级'
            }
        },
        {
            name: 'woodGrade',
            path: '/woodGrade',
            component: () =>
                import ('@/view/productCenter/woodGrade'),
            meta: {
                title: '更多-实木复合地板-木材分级'
            }
        },
        {
            path: '*',
            component: () =>
                import ('@/view/home')
        },
    ],
    scrollBehavior: () => ({
        x: 0,
        y: 0
    }),
})